<template>
	<view>
		
		<view class="like-item"  @click="todetails(v)">
			<image class="item-left" :src="v.imgs"></image>
			<view class="item-right">
				<view class="right-tit">
					{{v.name}}
				</view>
				<view class="right-p">
					{{v.type+"/" + v.point + '/' +v.range}}
				</view>
				<view class="right-che">
					<view class="che-tit" v-for="(i,index) in v.tabs" :key="index">
						{{i}}
					</view>
				</view>
				<view class="right-pric">
					{{v.price.toLocaleString()}}元/平
				</view>
				
			</view>
	</view>
	</view>
</template>

<script>
	export default {
		name:"foot",
		data() {
			return {
				
			};
		},
		props:{
			v:{
				type:Object,
				default:()=>({})
			}
		},
		methods:{
			//跳转详情
			todetails(v){
				// console.log(v);
				// console.log(v.tabs);
				v.tabs.forEach(i=>{
					// console.log(i);
					i
				})
				// v.tabs.forEach(i=>{
				// 	i = JSON.parse(i.replace(/'/g, '"'))
				// })
				this.$store.commit("details/info",v)
				this.$store.commit("details/FootList",v)
				uni.navigateTo({
					url:"/pages/details/details"
				})
			}
		}
	}
</script>

<style lang="scss">
.like-item {
				display: flex;
				height: 200rpx;
				margin-top: 40rpx;

				image {
					width: 100%;
					height: 100%
				}

				.item-left {
					width: 200rpx;

				}

				.item-right {
					// vertical-align: text-top;
					line-height: 1;
					// border: 1px solid red;
					flex: 1;
					padding-left: 40rpx;

					.right-tit {
						font-weight: bolder;
						font-size: 40rpx;
					}

					.right-p {
						padding: 16rpx 0;
					}

					.right-che {
						padding-bottom: 16rpx;
						display: flex;
						justify-items: self-start;
						
						.che-tit {
							font-size: 16rpx;
							// border: 1px solid red;
							background: #edf0f3;
							padding: 4rpx;
							margin-right:12rpx;
							// margin-left: 10rpx;
						}
					}
				}
			}
</style>